Skip to content

Maintenance june26#92

Merged
sgeinitz merged 2 commits into
mainfrom
maintenance_june26
Jun 8, 2026
Merged

Maintenance june26#92
sgeinitz merged 2 commits into
mainfrom
maintenance_june26

Conversation

@sgeinitz

@sgeinitz sgeinitz commented Jun 8, 2026

Copy link
Copy Markdown
Owner

No description provided.

Steve and others added 2 commits June 3, 2026 05:35
getFollowUpReplies built the replies DataFrame with pd.DataFrame(all_replies)
and no explicit columns. When no student had replied (all_replies == []), that
wrote a column-less CSV (just a newline); _loadFollowUpReplies then re-read it
with pd.read_csv and raised EmptyDataError, so the intended
"No student replies to assess." guard in assessFollowUpReplies was unreachable.

Add a REPLIES_COLUMNS class constant (mirroring ASSESSMENTS_COLUMNS) and pass
it to the DataFrame so the file always carries a header row. The empty case now
round-trips to an empty frame and the guard fires. Column order is unchanged
for the non-empty path.

Adds a regression test (TestFollowUpRepliesEmptyRoundTrip) covering the no-reply
round-trip, which the suite previously did not exercise.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CanvigatorCourse.__init__ built the data/figures subdirectory inline as
course_code.split('-')[0] + course_code.split('-')[1] + ..., which raised
IndexError for any course_code lacking at least two hyphen-separated parts
(e.g. 'MATH101' or 'CS 3120 Spring 2026'). Because this runs in __init__, it
blocked every task for such a course — inconsistent with _shortCourseLabel /
_composeConversationSubject, which already handle those codes gracefully.

Extract the logic into a module-level _courseCodeToPath() helper that keeps the
exact canonical mapping (CSI-3300-001-12345 -> /csi3300_12345, verified
byte-identical to the old code so existing course directories are unchanged)
and falls back to a sanitized form of the whole code when there are fewer than
two hyphen-separated parts. None/empty codes are handled too.

Adds TestCourseCodeToPath covering the canonical, no-hyphen, space-separated,
two-part, and None/empty cases.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sgeinitz sgeinitz merged commit fce658a into main Jun 8, 2026
2 checks passed
@sgeinitz sgeinitz deleted the maintenance_june26 branch June 8, 2026 23:09

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d50a179781

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread canvigator_course.py
whole code so course selection never crashes on an unusual code. Spaces are
stripped from the result in all cases.
"""
code = str(course_code or '').strip()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep blank course codes out of root data path

When Canvas returns a blank or None course_code, this normalization turns it into '', and the helper returns "/"; CanvigatorConfig.addCourseToPath then strips that to an empty directory name and leaves data_path/figures_path at the shared data and figures roots. In that scenario, exports and later find_latest_csv lookups for the course are no longer isolated from other courses' files, so a missing Canvas code can mix or read the wrong course artifacts instead of getting a unique fallback directory.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant